import React from "react";
import style from './search.module.scss'
class Search extends React.Component {
    constructor(props) {
        super(props);
        this.state = {

        }
    }
    render() {
        return (
            <div className={style.search}>
                <div className={style.box}>
                    <div className={style.title}>按类型查找</div>
                    <ul className={style.wrapper}>
                        {
                            this.props.searchType.map(value=>{
                                return (
                                    <li className={style.item} key={value.id}>
                                        <img src={value.thumb} alt=""/>
                                        <p>{value.name}</p>
                                    </li>
                                )
                            })
                        }
                    </ul>
                </div>
                <div className={style.box}>
                    <div className={style.title}>按图书查找</div>
                    <ul className={style.wrapper}>
                        {
                            this.props.searchBook.map(value=>{
                                return (
                                    <li className={style.item} key={value.id}>
                                        <img src={value.thumb} alt=""/>
                                        <p>{value.name}</p>
                                    </li>
                                )
                            })
                        }
                    </ul>
                </div>
            </div>
        );
    }
}
export default Search